package org.example.test1;

import java.util.Scanner;

public class Person {
    String name;
    int score;
    //构造方法

    public Person(){
    }
    public Person(String name) {
        this.name = name;
    }
    //出拳的方法
    public int showFist(){
        int num = 1;
        System.out.println("请出拳(1.剪刀 2.石头 3.布): ");
        Scanner input = new Scanner(System.in);
        num = input.nextInt();
        switch (num) {
            case 1:
                System.out.println(this.name+"出拳: 剪刀");
                break;
            case 2:
                System.out.println(this.name+"出拳: 石头");
                break;
            case 3:
                System.out.println(this.name+"出拳: 布");
                break;
            default:
                System.out.println("false");
        }
        return num;
    }
}
